package com.gnerv.pabu.basic.core.dto;

import com.gnerv.pabu.basic.core.entity.EmailConfig;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * <p>
 * 基础平台-邮件配置表
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-10-10
 */
@Data
@NoArgsConstructor
public class EmailConfigSaveDTO {

    private String ukId;
    private String name;
    private String host;
    private Integer port;
    private String account;
    private String authCode;
    private Integer status;
    private Integer sort;

    public EmailConfig convert() {
        EmailConfig emailConfig = new EmailConfig();
        BeanUtils.copyProperties(this, emailConfig);
        return emailConfig;
    }
}
